<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1>hello world</h1>
</body>
<script type="text/javascript">
    window.onload = function (ev) {
        //webSocket连接
        var ws = new WebSocket("ws://localhost:9090/ws");
        ws.onmessage = function(event){
            console.log("onmessage")
        };
        ws.onopen = function(event){
            console.log("Netty-WebSocket服务器。。。。。。连接")
        };
        ws.onclose = function(event){
            console.log("Netty-WebSocket服务器。。。。。。关闭")
        };
    }
</script>
</html>